<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>tmr_inject: Tmr_inject_v1_0</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.gif"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">tmr_inject
   </div>
   <div id="projectbrief">Xilinx SDK Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__tmr__inject__v1__0.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">Tmr_inject_v1_0</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_x_t_m_r___inject___config.html">XTMR_Inject_Config</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">This typedef contains configuration information for the device.  <a href="struct_x_t_m_r___inject___config.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_x_t_m_r___inject.html">XTMR_Inject</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <a class="el" href="struct_x_t_m_r___inject.html" title="The XTMR_Inject driver instance data. ">XTMR_Inject</a> driver instance data.  <a href="struct_x_t_m_r___inject.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga9ffe2a65461b512f2a92edd9aeb121b4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tmr__inject__v1__0.html#ga9ffe2a65461b512f2a92edd9aeb121b4">XTMR_Inject_WriteReg</a>(BaseAddress,  RegOffset,  Data)&#160;&#160;&#160;XTMR_Inject_Out32((BaseAddress) + (RegOffset), (u32)(Data))</td></tr>
<tr class="memdesc:ga9ffe2a65461b512f2a92edd9aeb121b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write a value to a TMRInject register.  <a href="#ga9ffe2a65461b512f2a92edd9aeb121b4">More...</a><br /></td></tr>
<tr class="separator:ga9ffe2a65461b512f2a92edd9aeb121b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga01af287ad77f7c44c914e70dd8028b85"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tmr__inject__v1__0.html#ga01af287ad77f7c44c914e70dd8028b85">XTMR_Inject_SetControlReg</a>(BaseAddress,  Mask)&#160;&#160;&#160;<a class="el" href="group__tmr__inject__v1__0.html#ga9ffe2a65461b512f2a92edd9aeb121b4">XTMR_Inject_WriteReg</a>((BaseAddress), XTI_CONTROL_REG_OFFSET, (Mask))</td></tr>
<tr class="memdesc:ga01af287ad77f7c44c914e70dd8028b85"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the contents of the control register.  <a href="#ga01af287ad77f7c44c914e70dd8028b85">More...</a><br /></td></tr>
<tr class="separator:ga01af287ad77f7c44c914e70dd8028b85"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga5283360c0584dfb4cd8c7be8a8fcb312"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tmr__inject__v1__0.html#ga5283360c0584dfb4cd8c7be8a8fcb312">XTMR_Inject_CfgInitialize</a> (<a class="el" href="struct_x_t_m_r___inject.html">XTMR_Inject</a> *InstancePtr, <a class="el" href="struct_x_t_m_r___inject___config.html">XTMR_Inject_Config</a> *Config, UINTPTR EffectiveAddr)</td></tr>
<tr class="memdesc:ga5283360c0584dfb4cd8c7be8a8fcb312"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize a <a class="el" href="struct_x_t_m_r___inject.html" title="The XTMR_Inject driver instance data. ">XTMR_Inject</a> instance.  <a href="#ga5283360c0584dfb4cd8c7be8a8fcb312">More...</a><br /></td></tr>
<tr class="separator:ga5283360c0584dfb4cd8c7be8a8fcb312"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6ee64c2bc63c5959641f76a24d56b58b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tmr__inject__v1__0.html#ga6ee64c2bc63c5959641f76a24d56b58b">XTMR_Inject_Enable</a> (<a class="el" href="struct_x_t_m_r___inject.html">XTMR_Inject</a> *InstancePtr, u8 CpuId)</td></tr>
<tr class="memdesc:ga6ee64c2bc63c5959641f76a24d56b58b"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function enables fault injection for the indicated CPU.  <a href="#ga6ee64c2bc63c5959641f76a24d56b58b">More...</a><br /></td></tr>
<tr class="separator:ga6ee64c2bc63c5959641f76a24d56b58b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa8895543796c01ea108b2fe355c13d3a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tmr__inject__v1__0.html#gaa8895543796c01ea108b2fe355c13d3a">XTMR_Inject_Disable</a> (<a class="el" href="struct_x_t_m_r___inject.html">XTMR_Inject</a> *InstancePtr)</td></tr>
<tr class="memdesc:gaa8895543796c01ea108b2fe355c13d3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function disables fault injection.  <a href="#gaa8895543796c01ea108b2fe355c13d3a">More...</a><br /></td></tr>
<tr class="separator:gaa8895543796c01ea108b2fe355c13d3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa8c496ccf948ca1b3ed359f6f6be485c"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tmr__inject__v1__0.html#gaa8c496ccf948ca1b3ed359f6f6be485c">XTMR_Inject_InjectBit</a> (<a class="el" href="struct_x_t_m_r___inject.html">XTMR_Inject</a> *InstancePtr, u32 Value, u8 Bit)</td></tr>
<tr class="memdesc:gaa8c496ccf948ca1b3ed359f6f6be485c"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function can be used to inject a fault in either:  <a href="#gaa8c496ccf948ca1b3ed359f6f6be485c">More...</a><br /></td></tr>
<tr class="separator:gaa8c496ccf948ca1b3ed359f6f6be485c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0459573a53d4807b01ee65ed3709b547"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tmr__inject__v1__0.html#ga0459573a53d4807b01ee65ed3709b547">XTMR_Inject_InjectMask</a> (<a class="el" href="struct_x_t_m_r___inject.html">XTMR_Inject</a> *InstancePtr, u32 Value, u32 Mask)</td></tr>
<tr class="memdesc:ga0459573a53d4807b01ee65ed3709b547"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function can be used to inject any number of faults defined by the Mask parameter in either:  <a href="#ga0459573a53d4807b01ee65ed3709b547">More...</a><br /></td></tr>
<tr class="separator:ga0459573a53d4807b01ee65ed3709b547"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad1f56c391e5fa2e2f57437e40b22634d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tmr__inject__v1__0.html#gad1f56c391e5fa2e2f57437e40b22634d">XTMR_Inject_Initialize</a> (<a class="el" href="struct_x_t_m_r___inject.html">XTMR_Inject</a> *InstancePtr, u16 DeviceId)</td></tr>
<tr class="memdesc:gad1f56c391e5fa2e2f57437e40b22634d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize a <a class="el" href="struct_x_t_m_r___inject.html" title="The XTMR_Inject driver instance data. ">XTMR_Inject</a> instance.  <a href="#gad1f56c391e5fa2e2f57437e40b22634d">More...</a><br /></td></tr>
<tr class="separator:gad1f56c391e5fa2e2f57437e40b22634d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae03f2de24906f2660c4ab03a869e50cb"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tmr__inject__v1__0.html#gae03f2de24906f2660c4ab03a869e50cb">XTMR_Inject_SelfTest</a> (<a class="el" href="struct_x_t_m_r___inject.html">XTMR_Inject</a> *InstancePtr)</td></tr>
<tr class="memdesc:gae03f2de24906f2660c4ab03a869e50cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Runs a self-test on the device hardware.  <a href="#gae03f2de24906f2660c4ab03a869e50cb">More...</a><br /></td></tr>
<tr class="separator:gae03f2de24906f2660c4ab03a869e50cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ga4808f00f81c65e406651a8c6a1768333"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_x_t_m_r___inject___config.html">XTMR_Inject_Config</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tmr__inject__v1__0.html#ga4808f00f81c65e406651a8c6a1768333">XTMR_Inject_ConfigTable</a> [XPAR_XTMR_INJECT_NUM_INSTANCES]</td></tr>
<tr class="memdesc:ga4808f00f81c65e406651a8c6a1768333"><td class="mdescLeft">&#160;</td><td class="mdescRight">The configuration table for TMR Inject devices.  <a href="#ga4808f00f81c65e406651a8c6a1768333">More...</a><br /></td></tr>
<tr class="separator:ga4808f00f81c65e406651a8c6a1768333"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga52343722e17f9e94767d114f4e4e1904"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_x_t_m_r___inject___config.html">XTMR_Inject_Config</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tmr__inject__v1__0.html#ga52343722e17f9e94767d114f4e4e1904">XTMR_Inject_ConfigTable</a> []</td></tr>
<tr class="memdesc:ga52343722e17f9e94767d114f4e4e1904"><td class="mdescLeft">&#160;</td><td class="mdescRight">The configuration table for TMR Inject devices.  <a href="#ga52343722e17f9e94767d114f4e4e1904">More...</a><br /></td></tr>
<tr class="separator:ga52343722e17f9e94767d114f4e4e1904"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga01af287ad77f7c44c914e70dd8028b85"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga01af287ad77f7c44c914e70dd8028b85">&#9670;&nbsp;</a></span>XTMR_Inject_SetControlReg</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XTMR_Inject_SetControlReg</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">BaseAddress, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">Mask&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;<a class="el" href="group__tmr__inject__v1__0.html#ga9ffe2a65461b512f2a92edd9aeb121b4">XTMR_Inject_WriteReg</a>((BaseAddress), XTI_CONTROL_REG_OFFSET, (Mask))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="xtmr__inject__l_8h.html">xtmr_inject_l.h</a>&gt;</code></p>

<p>Set the contents of the control register. </p>
<p>Use the XUL_CR_* constants defined above to create the bit-mask to be written to the register.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">BaseAddress</td><td>is the base address of the device </td></tr>
    <tr><td class="paramname">Mask</td><td>is the 32-bit value to write to the control register</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>C-style Signature: void <a class="el" href="group__tmr__inject__v1__0.html#ga01af287ad77f7c44c914e70dd8028b85" title="Set the contents of the control register. ">XTMR_Inject_SetControlReg(u32 BaseAddress, u32 Mask)</a>; </dd></dl>

</div>
</div>
<a id="ga9ffe2a65461b512f2a92edd9aeb121b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9ffe2a65461b512f2a92edd9aeb121b4">&#9670;&nbsp;</a></span>XTMR_Inject_WriteReg</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XTMR_Inject_WriteReg</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">BaseAddress, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">RegOffset, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">Data&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;XTMR_Inject_Out32((BaseAddress) + (RegOffset), (u32)(Data))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="xtmr__inject__l_8h.html">xtmr_inject_l.h</a>&gt;</code></p>

<p>Write a value to a TMRInject register. </p>
<p>A 32 bit write is performed.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">BaseAddress</td><td>is the base address of the TMRInject device. </td></tr>
    <tr><td class="paramname">RegOffset</td><td>is the register offset from the base to write to. </td></tr>
    <tr><td class="paramname">Data</td><td>is the data written to the register.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>C-style signature: void XTMR_Inject_WriteReg(u32 BaseAddress, u32 RegOffset, u32 Data) </dd></dl>

<p class="reference">Referenced by <a class="el" href="group__tmr__inject__v1__0.html#gaa8895543796c01ea108b2fe355c13d3a">XTMR_Inject_Disable()</a>, and <a class="el" href="group__tmr__inject__v1__0.html#ga6ee64c2bc63c5959641f76a24d56b58b">XTMR_Inject_Enable()</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga5283360c0584dfb4cd8c7be8a8fcb312"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5283360c0584dfb4cd8c7be8a8fcb312">&#9670;&nbsp;</a></span>XTMR_Inject_CfgInitialize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XTMR_Inject_CfgInitialize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_t_m_r___inject.html">XTMR_Inject</a> *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_x_t_m_r___inject___config.html">XTMR_Inject_Config</a> *&#160;</td>
          <td class="paramname"><em>Config</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">UINTPTR&#160;</td>
          <td class="paramname"><em>EffectiveAddr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="xtmr__inject_8c.html">xtmr_inject.c</a>&gt;</code></p>

<p>Initialize a <a class="el" href="struct_x_t_m_r___inject.html" title="The XTMR_Inject driver instance data. ">XTMR_Inject</a> instance. </p>
<p>The receive and transmit FIFOs of the core are not flushed, so the user may want to flush them. The hardware device does not have any way to disable the receiver such that any valid data may be present in the receive FIFO. This function disables the core interrupt. The baudrate and format of the data are fixed in the hardware at hardware build time.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>is a pointer to the <a class="el" href="struct_x_t_m_r___inject.html" title="The XTMR_Inject driver instance data. ">XTMR_Inject</a> instance. </td></tr>
    <tr><td class="paramname">Config</td><td>is a reference to a structure containing information about a specific TMR Inject device. This function initializes an InstancePtr object for a specific device specified by the contents of Config. This function can initialize multiple instance objects with the use of multiple calls giving different Config information on each call. </td></tr>
    <tr><td class="paramname">EffectiveAddr</td><td>is the device base address in the virtual memory address space. The caller is responsible for keeping the address mapping from EffectiveAddr to the device physical base address unchanged once this function is invoked. Unexpected errors may occur if the address mapping changes after this function is called. If address translation is not used, use Config-&gt;BaseAddress for this parameters, passing the physical address instead.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if everything starts up as expected.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The Config pointer argument is not used by this function, but is provided to keep the function signature consistent with other drivers. </dd></dl>

<p class="reference">References <a class="el" href="struct_x_t_m_r___inject.html#ac480a708bc6795061809b64df28786a0">XTMR_Inject::Address</a>, <a class="el" href="struct_x_t_m_r___inject___config.html#a7a515f723b124f04117e1193b2d965f3">XTMR_Inject_Config::MagicByte</a>, and <a class="el" href="struct_x_t_m_r___inject.html#a82839ec096fef02e029775a31ea9595d">XTMR_Inject::MagicByte</a>.</p>

</div>
</div>
<a id="gaa8895543796c01ea108b2fe355c13d3a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa8895543796c01ea108b2fe355c13d3a">&#9670;&nbsp;</a></span>XTMR_Inject_Disable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void XTMR_Inject_Disable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_t_m_r___inject.html">XTMR_Inject</a> *&#160;</td>
          <td class="paramname"><em>InstancePtr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="xtmr__inject_8c.html">xtmr_inject.c</a>&gt;</code></p>

<p>This function disables fault injection. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>is a pointer to the <a class="el" href="struct_x_t_m_r___inject.html" title="The XTMR_Inject driver instance data. ">XTMR_Inject</a> instance.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p class="reference">References <a class="el" href="group__tmr__inject__v1__0.html#ga9ffe2a65461b512f2a92edd9aeb121b4">XTMR_Inject_WriteReg</a>.</p>

</div>
</div>
<a id="ga6ee64c2bc63c5959641f76a24d56b58b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6ee64c2bc63c5959641f76a24d56b58b">&#9670;&nbsp;</a></span>XTMR_Inject_Enable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void XTMR_Inject_Enable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_t_m_r___inject.html">XTMR_Inject</a> *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>CpuId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="xtmr__inject_8c.html">xtmr_inject.c</a>&gt;</code></p>

<p>This function enables fault injection for the indicated CPU. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>is a pointer to the <a class="el" href="struct_x_t_m_r___inject.html" title="The XTMR_Inject driver instance data. ">XTMR_Inject</a> instance. </td></tr>
    <tr><td class="paramname">CpuId</td><td>is the CPU ID of the CPU where faults are to be injected. Must be 1 to 3.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p class="reference">References <a class="el" href="group__tmr__inject__v1__0.html#ga9ffe2a65461b512f2a92edd9aeb121b4">XTMR_Inject_WriteReg</a>.</p>

</div>
</div>
<a id="gad1f56c391e5fa2e2f57437e40b22634d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad1f56c391e5fa2e2f57437e40b22634d">&#9670;&nbsp;</a></span>XTMR_Inject_Initialize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XTMR_Inject_Initialize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_t_m_r___inject.html">XTMR_Inject</a> *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>DeviceId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="xtmr__inject_8h.html">xtmr_inject.h</a>&gt;</code></p>

<p>Initialize a <a class="el" href="struct_x_t_m_r___inject.html" title="The XTMR_Inject driver instance data. ">XTMR_Inject</a> instance. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>is a pointer to the <a class="el" href="struct_x_t_m_r___inject.html" title="The XTMR_Inject driver instance data. ">XTMR_Inject</a> instance. </td></tr>
    <tr><td class="paramname">DeviceId</td><td>is the unique id of the device controlled by this <a class="el" href="struct_x_t_m_r___inject.html" title="The XTMR_Inject driver instance data. ">XTMR_Inject</a> instance. Passing in a device id associates the generic <a class="el" href="struct_x_t_m_r___inject.html" title="The XTMR_Inject driver instance data. ">XTMR_Inject</a> instance to a specific device, as chosen by the caller or application developer.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if everything starts up as expected.</li>
<li>XST_DEVICE_NOT_FOUND if the device is not found in the configuration table.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p class="reference">Referenced by <a class="el" href="xtmr__inject__selftest__example_8c.html#ab7464457a76f35b9d202bfd4792eeebb">TMR_InjectSelfTestExample()</a>.</p>

</div>
</div>
<a id="gaa8c496ccf948ca1b3ed359f6f6be485c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa8c496ccf948ca1b3ed359f6f6be485c">&#9670;&nbsp;</a></span>XTMR_Inject_InjectBit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XTMR_Inject_InjectBit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_t_m_r___inject.html">XTMR_Inject</a> *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>Bit</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="xtmr__inject_8c.html">xtmr_inject.c</a>&gt;</code></p>

<p>This function can be used to inject a fault in either: </p>
<ul>
<li>
An address bit of a memory or memory mapped register address for any read or write access on AXI or LMB. </li>
<li>
A data bit written to memory or a memory mapped register on AXI or LMB, as well as output on an AXI Stream. &lt; </li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>is a pointer to the <a class="el" href="struct_x_t_m_r___inject.html" title="The XTMR_Inject driver instance data. ">XTMR_Inject</a> instance. </td></tr>
    <tr><td class="paramname">Value</td><td>is the memory or register address, oro the data. </td></tr>
    <tr><td class="paramname">Bit</td><td>is the bit where the fault is injected. Must be 0 to 31.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Either the unchanged value, or value with the fault injected for the CPU set up for fault injection.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

</div>
</div>
<a id="ga0459573a53d4807b01ee65ed3709b547"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0459573a53d4807b01ee65ed3709b547">&#9670;&nbsp;</a></span>XTMR_Inject_InjectMask()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XTMR_Inject_InjectMask </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_t_m_r___inject.html">XTMR_Inject</a> *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="xtmr__inject_8c.html">xtmr_inject.c</a>&gt;</code></p>

<p>This function can be used to inject any number of faults defined by the Mask parameter in either: </p>
<ul>
<li>
Any address bits of a memory or memory mapped register address for any read or write access on AXI or LMB. </li>
<li>
Any data bits written to memory or a memory mapped register on AXI or LMB, as well as output on an AXI Stream. &lt; </li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>is a pointer to the <a class="el" href="struct_x_t_m_r___inject.html" title="The XTMR_Inject driver instance data. ">XTMR_Inject</a> instance. </td></tr>
    <tr><td class="paramname">Value</td><td>is the memory or register address, oro the data. </td></tr>
    <tr><td class="paramname">Mask</td><td>defines the bits where faults are injected. A fault is injected for every bit in the mask set to 1.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Either the unchanged value, or value with the faults injected for the CPU set up for fault injection.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

</div>
</div>
<a id="gae03f2de24906f2660c4ab03a869e50cb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae03f2de24906f2660c4ab03a869e50cb">&#9670;&nbsp;</a></span>XTMR_Inject_SelfTest()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XTMR_Inject_SelfTest </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_t_m_r___inject.html">XTMR_Inject</a> *&#160;</td>
          <td class="paramname"><em>InstancePtr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="xtmr__inject_8h.html">xtmr_inject.h</a>&gt;</code></p>

<p>Runs a self-test on the device hardware. </p>
<p>Since there is no way to perform a loopback in the hardware, this test can only check the state of the status register to verify it is correct. This test assumes that the hardware device is still in its reset state, but has been initialized with the Initialize function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>is a pointer to the <a class="el" href="struct_x_t_m_r___inject.html" title="The XTMR_Inject driver instance data. ">XTMR_Inject</a> instance.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if the self-test was successful.</li>
<li>XST_FAILURE if the self-test failed, the status register value was not correct</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p class="reference">Referenced by <a class="el" href="xtmr__inject__selftest__example_8c.html#ab7464457a76f35b9d202bfd4792eeebb">TMR_InjectSelfTestExample()</a>.</p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="ga52343722e17f9e94767d114f4e4e1904"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga52343722e17f9e94767d114f4e4e1904">&#9670;&nbsp;</a></span>XTMR_Inject_ConfigTable <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_x_t_m_r___inject___config.html">XTMR_Inject_Config</a> XTMR_Inject_ConfigTable[]</td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="xtmr__inject__i_8h.html">xtmr_inject_i.h</a>&gt;</code></p>

<p>The configuration table for TMR Inject devices. </p>

</div>
</div>
<a id="ga4808f00f81c65e406651a8c6a1768333"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4808f00f81c65e406651a8c6a1768333">&#9670;&nbsp;</a></span>XTMR_Inject_ConfigTable <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_x_t_m_r___inject___config.html">XTMR_Inject_Config</a> XTMR_Inject_ConfigTable[XPAR_XTMR_INJECT_NUM_INSTANCES]</td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="xtmr__inject__g_8c.html">xtmr_inject_g.c</a>&gt;</code></p>
<b>Initial value:</b><div class="fragment"><div class="line">=</div><div class="line">{</div><div class="line">        {</div><div class="line">                XPAR_TMRINJECT_0_DEVICE_ID,     </div><div class="line">                XPAR_TMRINJECT_0_BASEADDR,      </div><div class="line">                XPAR_TMRINJECT_0_MAGIC,         </div><div class="line">                XPAR_TMRINJECT_0_CPU_ID         </div><div class="line">        },</div><div class="line">}</div></div><!-- fragment -->
<p>The configuration table for TMR Inject devices. </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Copyright &copy; 2015 Xilinx Inc. All rights reserved.</li>
  </ul>
</div>
</body>
</html>
